﻿using System;
using System.ServiceModel;

namespace Arete
{
    class Program
    {
        static void Main(string[] args)
        {
            IMyEvents evnt = new MySubscriber();
            var evntCntx = new InstanceContext(evnt);

            var proxy = new EventServiceClient(evntCntx);
            Console.WriteLine(
                "Client subscribe the event from the service at {0}",
                DateTime.Now);
            proxy.SubscribeEvent();
            Console.WriteLine("Client call operation which will fire the event");
            proxy.DoSomethingAndFireEvent();
            Console.ReadLine();
        }
    }
}
